package com.log.james.service;

import com.log.james.entity.DestIp;
import com.log.james.entity.EventsType;
import com.log.james.mapper.EventsDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Service
public class EventsService implements EventsDao,Serializable {
    @Autowired
    private EventsDao eventsDao;
    @Override
    public List<Map<String, Object>> getAttackEvents() {
        List<Map<String,Object>> maps = eventsDao.getAttackEvents();
        return maps;
}

    @Override
    public List<Map<String,Object>> getAttackType(String st,String et) {
        List<Map<String,Object>> lists = eventsDao.getAttackType(st,et);
        return lists;
    }


    @Override
    public List<Map<Object, Object>> getNewestEvent(Date st,Date et) {
        List<Map<Object,Object>> newstList = eventsDao.getNewestEvent(st,et);
        return newstList;
    }

    @Override
    public List<DestIp> attackSource(Date st,Date et) {
        List<DestIp> attackSourceList = eventsDao.attackSource(st,et);
        return attackSourceList;
    }

    @Override
    public List<Map<String, Object>> getTodayEvents(Date st, Date et) {
        List<Map<String,Object>> lists = eventsDao.getTodayEvents(st,et);
        return lists;
    }

    @Override
    public List<Map<String, Object>> getEventsDetails(Date st) {
        return eventsDao.getEventsDetails(st);
    }
}
